import 'dart:io';
import 'package:flutter/widgets.dart';

Widget avatar(String avatarThumbPath) {
  print(avatarThumbPath);
  if (avatarThumbPath != "") {
    print("me.avatarThumbPath != \"\"");
    return Image.file(
      File(avatarThumbPath),
      fit: BoxFit.fill,
    );
  } else {
    print("me.avatarThumbPath == \"\"");
    return Image.asset(
      "images/user--avatar--filled.png",
      width: 50.0,
      height: 50.0,
    );
  }
}

Widget chatAvatar(String avatarThumbPath) {
  print(avatarThumbPath);
  if (avatarThumbPath != "") {
    print("me.avatarThumbPath != \"\"");
    return Image.file(
      File(avatarThumbPath),
      fit: BoxFit.fill,
      width: 30.0,
      height: 30.0,
    );
  } else {
    print("me.avatarThumbPath == \"\"");
    return Image.asset(
      "images/user--avatar--filled.png",
      fit: BoxFit.fill,
      width: 30.0,
      height: 30.0,
    );
  }
}
